package br.com.nooclix.ptt.ws.adapter.impl;

import java.lang.reflect.Type;
import java.util.List;

import br.com.nooclix.ptt.core.domain.afiliate.Affiliate;
import br.com.nooclix.ptt.ws.adapter.AbstractAdapter;

import com.google.gson.reflect.TypeToken;

public class AffiliateAdapter extends AbstractAdapter<Affiliate> {

	public AffiliateAdapter() {
		super(Affiliate.class);
	}

	@Override
	public List<Affiliate> listConvert(String json) {
		Type type = new TypeToken<List<Affiliate>>() {
		}.getType();
		return getJsonEngine().fromJson(json, type);
	}

}